import * as Types from '../actions/types';

export const simpleReducer = (state = {num : 1}, action) => {
  switch (action.type) {
    case Types.ADD_NUM:
      return {
        ...state,
        num: state.num + 1
      }
    case Types.DEC_NUM:
      return {
        ...state,
        num: state.num - 1
      }
    default:
      return state;
  }
}
